﻿using Basic.HrRemoteModel.Emp.Model;
using Basic.OAGatewayModule.Interface;
using Basic.OAGatewayModule.Model.FillItem;
using Basic.OARemoteModel.FillInItem.Model;
using WeDonekRpc.Client;
using WeDonekRpc.HttpApiGateway;
using WeDonekRpc.HttpApiGateway.Model;

namespace Basic.OAGatewayModule.Api
{
    internal class FillInItemApi : ApiController
    {
        private readonly IFillInItemService _Service;

        public FillInItemApi ( IFillInItemService service )
        {
            this._Service = service;
        }
        public void Delete ( LongParam<long> param )
        {
            this._Service.Delete(param.Id, param.Value);
        }
        public PagingResult<EmpBasicDatum> Query ( PagingParam<FillInItemQuery> param )
        {
            return this._Service.Query(param, base.UserState.ToCompanyId());
        }
        public void Sync ( LongParam<FillGetEmp> obj )
        {
            this._Service.Sync(obj.Id, obj.Value, base.UserState.ToCompanyId());
        }
    }
}
